/*
 Navicat Premium Data Transfer

 Source Server         : root
 Source Server Type    : MySQL
 Source Server Version : 80028
 Source Host           : localhost:3306
 Source Schema         : ordersystem

 Target Server Type    : MySQL
 Target Server Version : 80028
 File Encoding         : 65001

 Date: 18/02/2023 23:10:44
*/

SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;

-- ----------------------------
-- Table structure for o_category
-- ----------------------------
DROP TABLE IF EXISTS `o_category`;
CREATE TABLE `o_category` (
  `id` int NOT NULL AUTO_INCREMENT COMMENT '分类id',
  `shop_id` int NOT NULL COMMENT '店铺id，分类属于店铺',
  `name` varchar(20) NOT NULL COMMENT '分类名称',
  PRIMARY KEY (`id`),
  KEY `shop_id` (`shop_id`),
  CONSTRAINT `shop_id` FOREIGN KEY (`shop_id`) REFERENCES `o_shop` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=16 DEFAULT CHARSET=utf8mb3;

-- ----------------------------
-- Records of o_category
-- ----------------------------
BEGIN;
INSERT INTO `o_category` VALUES (1, 1, '包点类');
INSERT INTO `o_category` VALUES (2, 1, '美味蒸饺');
INSERT INTO `o_category` VALUES (3, 1, '招牌肠粉');
INSERT INTO `o_category` VALUES (4, 1, '营养粥');
INSERT INTO `o_category` VALUES (5, 2, '小炒类');
INSERT INTO `o_category` VALUES (6, 2, '炒饭类');
INSERT INTO `o_category` VALUES (7, 2, '烧腊');
INSERT INTO `o_category` VALUES (8, 2, '炒面类');
INSERT INTO `o_category` VALUES (9, 2, '另外加量');
INSERT INTO `o_category` VALUES (10, 2, '饮料');
INSERT INTO `o_category` VALUES (12, 1, '测试用的分类');
INSERT INTO `o_category` VALUES (13, 3, '5月奶茶');
INSERT INTO `o_category` VALUES (14, 3, '不错');
INSERT INTO `o_category` VALUES (15, 2, 'test');
COMMIT;

-- ----------------------------
-- Table structure for o_comment
-- ----------------------------
DROP TABLE IF EXISTS `o_comment`;
CREATE TABLE `o_comment` (
  `id` int NOT NULL AUTO_INCREMENT,
  `shop_id` int DEFAULT NULL,
  `name` varchar(20) NOT NULL DEFAULT '匿名用户' COMMENT '用户微信名字 前端上传微信的名字',
  `content` varchar(255) NOT NULL COMMENT '评论内容',
  `reply` varchar(255) DEFAULT NULL COMMENT '店主回复内容',
  `is_reply` bit(1) NOT NULL DEFAULT b'0' COMMENT '店主是否已经回复，后端管理显示回复按钮',
  `create_date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '评论时间',
  `reply_date` timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP COMMENT '回复时间',
  PRIMARY KEY (`id`),
  KEY `shop_id_comment` (`shop_id`),
  CONSTRAINT `shop_id_comment` FOREIGN KEY (`shop_id`) REFERENCES `o_shop` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=29 DEFAULT CHARSET=utf8mb3;

-- ----------------------------
-- Records of o_comment
-- ----------------------------
BEGIN;
INSERT INTO `o_comment` VALUES (3, 1, '用户43685', '筷子都不给，我用手抓来吃？？？？？', NULL, b'0', '2022-02-18 14:31:10', '2022-02-18 14:31:10');
INSERT INTO `o_comment` VALUES (4, 1, '莫提斯', '这个饺子都没熟', NULL, b'0', '2022-02-18 15:34:50', '2022-02-18 15:34:50');
INSERT INTO `o_comment` VALUES (5, 1, '四眼天鸡', '很好吃，很新鲜', NULL, b'0', '2022-02-18 15:36:03', '2022-02-18 15:36:03');
INSERT INTO `o_comment` VALUES (6, 2, '匿名用户', '油太多了，菜下面全都是油', '对不起，下次会注意的', b'1', '2022-02-18 16:10:02', '2022-02-18 16:10:05');
INSERT INTO `o_comment` VALUES (7, 2, '迪迦奥特曼', '辣死了，你们的辣椒不用钱吗？？放这么多辣椒', '下次可以打电话给我重做一份，不用随随便便写这样的评论，做生意很难的', b'1', '2022-02-18 16:10:33', '2022-02-19 11:47:29');
INSERT INTO `o_comment` VALUES (8, 2, '白莲花', '味道还是可以的，就是分量太少了，肉少得可怜', '你一单才十块钱不到，最后到我手里才几块钱，你还要多少肉？？？', b'1', '2022-02-18 16:11:05', '2022-02-19 11:46:49');
INSERT INTO `o_comment` VALUES (9, 2, '键盘侠', '又贵又少，赶快倒闭吧', '现在大学生素质真低', b'1', '2022-02-18 16:50:35', '2022-02-19 11:37:00');
INSERT INTO `o_comment` VALUES (11, 1, '品客薯片', '包子小小个，还卖这么贵', NULL, b'0', '2022-02-19 11:49:30', NULL);
INSERT INTO `o_comment` VALUES (12, 1, '圆珠笔', '肠粉好难吃', NULL, b'0', '2022-02-19 11:50:28', NULL);
INSERT INTO `o_comment` VALUES (13, 2, '万金油', '第二次不送餐具了，你们店是想怎么样？', NULL, b'0', '2022-02-19 11:51:22', NULL);
INSERT INTO `o_comment` VALUES (14, 2, '杯盖', '这个叉烧饭，一大半都是肥肉，全都倒掉了，难吃死了', NULL, b'0', '2022-02-19 11:52:03', NULL);
INSERT INTO `o_comment` VALUES (15, 1, '唇膏', '没吃过这么难吃的肠粉，老板是潮汕的吧？', NULL, b'0', '2022-02-19 11:54:11', NULL);
INSERT INTO `o_comment` VALUES (16, 1, '充电器', '油条有股臭味，油不新鲜', NULL, b'0', '2022-02-19 11:54:45', NULL);
INSERT INTO `o_comment` VALUES (17, 1, '正义的男大学生', '好吃好吃，每天都要点饺子吃', NULL, b'0', '2022-02-19 11:55:19', NULL);
INSERT INTO `o_comment` VALUES (18, 1, '黑魔仙小月', '无语，这个鲜虾肠粉的虾是臭的，吃完拉肚子，我的魔仙能量都拉完出来了，避雷这家店了', NULL, b'0', '2022-02-19 11:56:52', NULL);
INSERT INTO `o_comment` VALUES (19, 1, 'Quibbler', '真实评价测试,好吃', NULL, b'0', '2022-03-13 18:00:39', NULL);
INSERT INTO `o_comment` VALUES (20, 1, 'Quibbler', '', NULL, b'0', '2022-03-13 18:27:13', NULL);
INSERT INTO `o_comment` VALUES (21, 1, 'Quibbler', '再也不逃税啦', NULL, b'0', '2022-03-14 16:15:36', NULL);
INSERT INTO `o_comment` VALUES (22, 1, 'Quibbler', '好', NULL, b'0', '2022-03-14 16:20:35', NULL);
INSERT INTO `o_comment` VALUES (23, 2, 'Quibbler', 'comment test', 'thanks', b'1', '2022-03-14 19:36:48', '2022-03-14 19:37:26');
INSERT INTO `o_comment` VALUES (24, 1, 'Quibbler', '难吃死了！再也不会点了！', NULL, b'0', '2022-05-05 14:58:58', NULL);
INSERT INTO `o_comment` VALUES (25, 3, 'Quibbler', '答辩 加油', '好的！', b'1', '2022-05-07 15:57:25', '2022-05-07 15:59:38');
INSERT INTO `o_comment` VALUES (26, 1, 'Quibbler', '好的，不错', NULL, b'0', '2022-05-07 16:11:55', NULL);
INSERT INTO `o_comment` VALUES (27, 3, '石久', '奶茶不错', NULL, b'0', '2022-05-07 16:21:15', NULL);
INSERT INTO `o_comment` VALUES (28, 3, '石久', '很好）很好', '感谢', b'1', '2022-05-07 16:26:48', '2022-05-07 16:28:17');
COMMIT;

-- ----------------------------
-- Table structure for o_food
-- ----------------------------
DROP TABLE IF EXISTS `o_food`;
CREATE TABLE `o_food` (
  `id` int NOT NULL AUTO_INCREMENT COMMENT '菜品id',
  `shop_id` int NOT NULL COMMENT '店铺id，菜品属于店铺',
  `category_id` int NOT NULL COMMENT '分类id，菜品的分类',
  `name` varchar(20) NOT NULL COMMENT '菜品名字',
  `price` decimal(10,2) NOT NULL DEFAULT '15.00' COMMENT '菜品价格，保留两位小数',
  `is_recommend` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否今日推荐',
  `img_src` varchar(255) DEFAULT NULL COMMENT '菜品图片url',
  `description` varchar(255) DEFAULT '暂无菜品描述' COMMENT '菜品描述，如做法，食材等',
  PRIMARY KEY (`id`),
  KEY `shop_id_for_food` (`shop_id`),
  KEY `category_id` (`category_id`),
  CONSTRAINT `category_id` FOREIGN KEY (`category_id`) REFERENCES `o_category` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
  CONSTRAINT `shop_id_for_food` FOREIGN KEY (`shop_id`) REFERENCES `o_shop` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=54 DEFAULT CHARSET=utf8mb3;

-- ----------------------------
-- Records of o_food
-- ----------------------------
BEGIN;
INSERT INTO `o_food` VALUES (1, 1, 1, '豆沙包(3个)', 5.99, b'0', 'http://food-1309527051.cos.ap-guangzhou.myqcloud.com/豆沙包.png', '美味豆沙包222');
INSERT INTO `o_food` VALUES (2, 1, 1, '莲蓉包(2个)', 3.50, b'0', 'http://food-1309527051.cos.ap-guangzhou.myqcloud.com/莲蓉包.png', '新鲜莲蓉包');
INSERT INTO `o_food` VALUES (3, 1, 1, '馒头(2个)', 1.99, b'0', 'http://food-1309527051.cos.ap-guangzhou.myqcloud.com/馒头.png', '现蒸奶香小馒头，香气十足');
INSERT INTO `o_food` VALUES (4, 1, 1, '葱花卷(2个)', 3.00, b'0', 'http://food-1309527051.cos.ap-guangzhou.myqcloud.com/葱花卷.png', '葱花香气十足');
INSERT INTO `o_food` VALUES (5, 1, 2, '玉米鲜肉饺(6个)', 8.00, b'1', 'http://food-1309527051.cos.ap-guangzhou.myqcloud.com/玉米鲜肉饺.png', '现蒸香甜可口玉米饺');
INSERT INTO `o_food` VALUES (6, 1, 2, '猪肉白菜饺(6个)', 8.00, b'0', 'http://food-1309527051.cos.ap-guangzhou.myqcloud.com/猪肉白菜饺.png', '新鲜猪肉，脆爽白菜');
INSERT INTO `o_food` VALUES (7, 1, 2, '韭菜鲜肉饺(6个)', 9.00, b'0', 'http://food-1309527051.cos.ap-guangzhou.myqcloud.com/韭菜鲜肉饺.png', '暂无菜品描述');
INSERT INTO `o_food` VALUES (8, 1, 2, '冬菇鲜肉饺(6个)', 9.00, b'1', 'http://food-1309527051.cos.ap-guangzhou.myqcloud.com/冬菇鲜肉饺.png', '暂无菜品描述');
INSERT INTO `o_food` VALUES (9, 1, 3, '斋肠粉', 6.00, b'0', 'http://food-1309527051.cos.ap-guangzhou.myqcloud.com/斋肠粉.png', '爽滑现点现做肠粉');
INSERT INTO `o_food` VALUES (10, 1, 3, '鸡蛋肠粉', 8.00, b'0', 'http://food-1309527051.cos.ap-guangzhou.myqcloud.com/鸡蛋肠粉.png', '暂无菜品描述');
INSERT INTO `o_food` VALUES (11, 1, 3, '鸡蛋瘦肉肠粉', 10.00, b'0', 'http://food-1309527051.cos.ap-guangzhou.myqcloud.com/鸡蛋瘦肉肠粉.png', '暂无菜品描述');
INSERT INTO `o_food` VALUES (12, 1, 3, '鲜虾肠粉', 12.00, b'0', 'http://food-1309527051.cos.ap-guangzhou.myqcloud.com/鲜虾肠粉.png', '新鲜虾仁，香甜可口');
INSERT INTO `o_food` VALUES (13, 1, 3, '牛肉肠粉', 13.00, b'0', 'http://food-1309527051.cos.ap-guangzhou.myqcloud.com/牛肉肠粉.png', '暂无菜品描述');
INSERT INTO `o_food` VALUES (14, 1, 4, '白粥', 5.00, b'0', 'http://food-1309527051.cos.ap-guangzhou.myqcloud.com/白粥.png', '现煮白粥');
INSERT INTO `o_food` VALUES (15, 1, 4, '皮蛋瘦肉粥', 7.00, b'0', 'http://food-1309527051.cos.ap-guangzhou.myqcloud.com/皮蛋瘦肉粥.png', '新鲜皮蛋，当天现杀新鲜猪肉，下单马上熬粥');
INSERT INTO `o_food` VALUES (16, 1, 4, '香菇山药粥', 8.00, b'0', 'http://food-1309527051.cos.ap-guangzhou.myqcloud.com/香菇山药粥.png', '暂无菜品描述');
INSERT INTO `o_food` VALUES (17, 1, 1, '油条', 1.50, b'0', 'http://food-1309527051.cos.ap-guangzhou.myqcloud.com/油条.png', '现炸油条');
INSERT INTO `o_food` VALUES (18, 1, 1, '糯米鸡', 6.00, b'0', 'http://food-1309527051.cos.ap-guangzhou.myqcloud.com/糯米鸡.png', '暂无菜品描述');
INSERT INTO `o_food` VALUES (19, 1, 1, '小笼包(8个)', 7.00, b'0', 'http://food-1309527051.cos.ap-guangzhou.myqcloud.com/小笼包.png', '暂无菜品描述');
INSERT INTO `o_food` VALUES (20, 1, 1, '五香茶叶蛋', 2.00, b'0', 'http://food-1309527051.cos.ap-guangzhou.myqcloud.com/茶叶蛋.png', '茶叶蛋自由');
INSERT INTO `o_food` VALUES (21, 2, 5, '农家小炒肉饭', 15.00, b'1', 'http://food-1309527051.cos.ap-guangzhou.myqcloud.com/农家小炒肉.png', '暂无菜品描述');
INSERT INTO `o_food` VALUES (22, 2, 5, '番茄炒蛋饭', 15.00, b'1', 'http://food-1309527051.cos.ap-guangzhou.myqcloud.com/番茄炒蛋.png', '暂无菜品描述');
INSERT INTO `o_food` VALUES (23, 2, 5, '青椒牛肉饭', 18.00, b'0', 'http://food-1309527051.cos.ap-guangzhou.myqcloud.com/青椒炒牛肉.png', '暂无菜品描述');
INSERT INTO `o_food` VALUES (24, 2, 5, '腐竹牛腩饭', 22.00, b'0', 'http://food-1309527051.cos.ap-guangzhou.myqcloud.com/腐竹牛腩.png', '暂无菜品描述');
INSERT INTO `o_food` VALUES (25, 2, 6, '牛肉炒饭', 14.00, b'0', 'http://food-1309527051.cos.ap-guangzhou.myqcloud.com/牛肉炒饭.png', '暂无菜品描述');
INSERT INTO `o_food` VALUES (26, 2, 6, '扬州炒饭', 15.00, b'0', 'http://food-1309527051.cos.ap-guangzhou.myqcloud.com/扬州炒饭.png', '暂无菜品描述');
INSERT INTO `o_food` VALUES (27, 2, 6, '鸡蛋炒饭', 12.00, b'0', 'http://food-1309527051.cos.ap-guangzhou.myqcloud.com/蛋炒饭.png', '暂无菜品描述');
INSERT INTO `o_food` VALUES (28, 2, 6, '兰州炒饭', 15.00, b'0', 'http://food-1309527051.cos.ap-guangzhou.myqcloud.com/兰州炒饭.png', '暂无菜品描述');
INSERT INTO `o_food` VALUES (29, 2, 7, '烧鸭腿饭', 19.00, b'0', 'http://food-1309527051.cos.ap-guangzhou.myqcloud.com/鸭腿饭.png', '暂无菜品描述');
INSERT INTO `o_food` VALUES (30, 2, 7, '烧鹅腿饭', 25.00, b'0', 'http://food-1309527051.cos.ap-guangzhou.myqcloud.com/鹅腿饭.png', '暂无菜品描述');
INSERT INTO `o_food` VALUES (31, 2, 7, '蜜汁叉烧饭(瘦)', 20.00, b'0', 'http://food-1309527051.cos.ap-guangzhou.myqcloud.com/叉烧饭.png', '暂无菜品描述');
INSERT INTO `o_food` VALUES (32, 2, 7, '手撕鸡饭', 16.00, b'0', 'http://food-1309527051.cos.ap-guangzhou.myqcloud.com/手撕鸡.png', '暂无菜品描述');
INSERT INTO `o_food` VALUES (33, 2, 8, '牛肉炒拉面', 18.00, b'0', 'http://food-1309527051.cos.ap-guangzhou.myqcloud.com/牛肉拉面.png', '暂无菜品描述');
INSERT INTO `o_food` VALUES (34, 2, 8, '鸡蛋炒面', 13.00, b'0', 'http://food-1309527051.cos.ap-guangzhou.myqcloud.com/鸡蛋炒面.png', '暂无菜品描述');
INSERT INTO `o_food` VALUES (35, 2, 8, '三丝炒面', 15.00, b'0', 'http://food-1309527051.cos.ap-guangzhou.myqcloud.com/三丝炒面.png', '暂无菜品描述');
INSERT INTO `o_food` VALUES (36, 2, 8, '湿炒牛河', 20.00, b'0', 'http://food-1309527051.cos.ap-guangzhou.myqcloud.com/湿炒牛河.png', '暂无菜品描述');
INSERT INTO `o_food` VALUES (37, 2, 10, '可嘴可乐(250ml)', 5.00, b'0', 'http://food-1309527051.cos.ap-guangzhou.myqcloud.com/可乐.png', '暂无菜品描述');
INSERT INTO `o_food` VALUES (38, 2, 10, '雪碧(200ml)', 5.00, b'0', 'http://food-1309527051.cos.ap-guangzhou.myqcloud.com/雪碧.png', '暂无菜品描述');
INSERT INTO `o_food` VALUES (39, 2, 10, '冰柠乐', 8.00, b'0', 'http://food-1309527051.cos.ap-guangzhou.myqcloud.com/冰柠乐.png', '暂无菜品描述');
INSERT INTO `o_food` VALUES (40, 2, 9, '米饭(一盒)', 5.00, b'0', 'http://food-1309527051.cos.ap-guangzhou.myqcloud.com/米饭.png', '暂无菜品描述');
INSERT INTO `o_food` VALUES (41, 2, 9, '荷包蛋', 2.50, b'0', 'http://food-1309527051.cos.ap-guangzhou.myqcloud.com/荷包蛋.png', '暂无菜品描述');
INSERT INTO `o_food` VALUES (42, 2, 9, '小份青菜', 4.50, b'0', 'http://food-1309527051.cos.ap-guangzhou.myqcloud.com/青菜.png', '暂无菜品描述');
INSERT INTO `o_food` VALUES (43, 2, 9, '卤鸡腿', 7.00, b'0', 'http://food-1309527051.cos.ap-guangzhou.myqcloud.com/鸡腿.png', '暂无菜品描述');
INSERT INTO `o_food` VALUES (46, 1, 1, '包子', 22.00, b'0', 'http://food-1309527051.cos.ap-guangzhou.myqcloud.com/F1359277-AA2A-419A-A607-95AC95E0092C_4_5005_c.jpeg', '222');
INSERT INTO `o_food` VALUES (47, 1, 2, '皇帝的蒸饺', 88.00, b'1', 'http://food-1309527051.cos.ap-guangzhou.myqcloud.com/07C224CA-D886-4760-8400-689222D9A338_4_5005_c.jpeg', '美味');
INSERT INTO `o_food` VALUES (48, 1, 1, '皇帝的包子', 88.00, b'1', 'http://food-1309527051.cos.ap-guangzhou.myqcloud.com/2922B438-6D2A-4A69-B202-CF91909C8CC6.jpeg', '好吃');
INSERT INTO `o_food` VALUES (50, 1, 12, '我积极缴税', 98.88, b'1', 'http://food-1309527051.cos.ap-guangzhou.myqcloud.com/7AD2738D-025E-4897-9F01-03C7A14CA897_4_5005_c.jpeg', '超长名字测试超长名字测试超长名字测试超长名字测试超长名字测试超长名字测试超长名字测试超长名字测试超长名字测试超长名字测试超长名字测试超长名字测试超长名字测试');
INSERT INTO `o_food` VALUES (51, 3, 13, '五月必买失眠奶茶', 9.90, b'0', 'http://food-1309527051.cos.ap-guangzhou.myqcloud.com/B4B48264-EE73-4495-8F6D-6BC7B1423098.jpeg', '喝了睡不着的奶茶');
INSERT INTO `o_food` VALUES (52, 3, 13, '奶茶001', 77.00, b'1', 'http://food-1309527051.cos.ap-guangzhou.myqcloud.com/natie.JPG', '奶茶');
INSERT INTO `o_food` VALUES (53, 3, 14, '贵的奶茶', 99.00, b'0', 'http://food-1309527051.cos.ap-guangzhou.myqcloud.com/natie.JPG', '不错');
COMMIT;

-- ----------------------------
-- Table structure for o_order
-- ----------------------------
DROP TABLE IF EXISTS `o_order`;
CREATE TABLE `o_order` (
  `id` int NOT NULL AUTO_INCREMENT,
  `shop_id` int DEFAULT NULL,
  `open_id` varchar(255) DEFAULT NULL,
  `name` varchar(20) DEFAULT NULL,
  `address` varchar(255) DEFAULT NULL,
  `phone` varchar(20) DEFAULT NULL,
  `status` int DEFAULT '0',
  `app_delete` bit(1) DEFAULT b'0',
  `admin_delete` bit(1) DEFAULT b'0',
  `created` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  `updated` timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP,
  `commented` bit(1) DEFAULT b'0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=35 DEFAULT CHARSET=utf8mb3;

-- ----------------------------
-- Records of o_order
-- ----------------------------
BEGIN;
INSERT INTO `o_order` VALUES (1, 1, 'testxyz14hgenu', '张三', '广东省广州市番禺区小谷围广东药科大学11栋生活区', '13538445129', 2, b'0', b'0', '2022-02-20 20:42:37', '2023-02-18 21:20:29', b'0');
INSERT INTO `o_order` VALUES (2, 1, 'yuhrfedhmedfhrfgh', '李四', '广东广州小谷围街道广东药科大学教学区B栋', '13538445129', 2, b'0', b'0', '2022-02-20 20:42:52', '2023-02-18 21:20:29', b'0');
INSERT INTO `o_order` VALUES (3, 1, 'sthkjikolfdvbh', '正义的男大学生', '广东广州大学城广东药科大学生活区10栋', '13538445129', 2, b'0', b'0', '2022-02-20 20:43:12', '2023-02-18 21:20:29', b'0');
INSERT INTO `o_order` VALUES (4, 1, 'rwg6huijh97dxv', '键盘侠', '广东广州大学城广东药科大学1栋', '13638445990', 3, b'0', b'0', '2022-02-20 20:43:23', '2022-02-23 20:41:32', b'0');
INSERT INTO `o_order` VALUES (5, 1, 'test-openid-2022-3-11', '张三', '广东省广州市海珠区新港中路397号', '020-81167888', 3, b'0', b'0', '2022-03-11 16:33:14', '2022-03-11 16:50:04', b'0');
INSERT INTO `o_order` VALUES (6, 2, 'test-openid-2022-3-11', '张三', '广东省广州市海珠区新港中路397号', '020-81167888', 2, b'0', b'1', '2022-03-11 16:33:14', '2022-03-11 16:47:29', b'0');
INSERT INTO `o_order` VALUES (7, 1, 'test-openid-2022-3-11', '张三', '广东省广州市海珠区新港中路397号', '020-81167888', 3, b'0', b'0', '2022-03-11 16:35:00', '2022-03-11 16:50:01', b'0');
INSERT INTO `o_order` VALUES (8, 2, 'test-openid-2022-3-11', '张三', '广东省广州市海珠区新港中路397号', '020-81167888', 2, b'0', b'1', '2022-03-11 16:35:00', '2022-03-11 16:47:35', b'0');
INSERT INTO `o_order` VALUES (9, 1, 'test-openid-2022-3-11', '张三', '广东省广州市海珠区新港中路397号', '020-81167888', 2, b'0', b'0', '2022-03-11 16:45:41', '2022-03-12 15:12:07', b'0');
INSERT INTO `o_order` VALUES (10, 2, 'test-openid-2022-3-11', '张三', '广东省广州市海珠区新港中路397号', '020-81167888', 0, b'0', b'0', '2022-03-11 16:45:41', NULL, b'0');
INSERT INTO `o_order` VALUES (11, 1, 'test-openid-2022-3-11', '张三', '广东省广州市海珠区新港中路397号', '020-81167888', 2, b'0', b'0', '2022-03-11 18:04:59', '2022-03-12 15:12:03', b'0');
INSERT INTO `o_order` VALUES (12, 1, 'oUfzP5XvqEfw60TaNMR40gN8LWhA', '张三', '广东省广州市海珠区新港中路397号', '020-81167888', 2, b'0', b'0', '2022-03-11 18:08:25', '2022-03-13 18:11:28', b'0');
INSERT INTO `o_order` VALUES (13, 1, 'oUfzP5XvqEfw60TaNMR40gN8LWhA', '张三', '广东省广州市海珠区新港中路397号', '020-81167888', 2, b'0', b'0', '2022-03-11 18:08:57', '2022-03-14 16:15:36', b'1');
INSERT INTO `o_order` VALUES (14, 2, 'oUfzP5XvqEfw60TaNMR40gN8LWhA', '张三', '广东省广州市海珠区新港中路397号', '020-81167888', 0, b'0', b'0', '2022-03-11 18:11:21', NULL, b'0');
INSERT INTO `o_order` VALUES (15, 1, 'oUfzP5XvqEfw60TaNMR40gN8LWhA', '张三', '广东省广州市海珠区新港中路397号', '020-81167888', 2, b'0', b'0', '2022-03-11 18:19:42', '2022-03-13 18:27:13', b'1');
INSERT INTO `o_order` VALUES (16, 2, 'oUfzP5XvqEfw60TaNMR40gN8LWhA', '张三', '广东省广州市海珠区新港中路397号', '020-81167888', 0, b'0', b'0', '2022-03-11 18:19:42', NULL, b'0');
INSERT INTO `o_order` VALUES (17, 1, 'oUfzP5XvqEfw60TaNMR40gN8LWhA', '张三', '广东省广州市海珠区新港中路397号', '020-81167888', 2, b'0', b'0', '2022-03-11 18:20:15', '2022-05-05 14:58:58', b'1');
INSERT INTO `o_order` VALUES (18, 2, 'oUfzP5XvqEfw60TaNMR40gN8LWhA', '张三', '广东省广州市海珠区新港中路397号', '020-81167888', 0, b'0', b'0', '2022-03-11 18:23:11', '2022-03-13 18:11:28', b'0');
INSERT INTO `o_order` VALUES (19, 2, 'oUfzP5SbK9dz-gdOpGMe08tsP1ks', '程同学', '广东省广州市番禺区东环街道地铁4号线,地铁7号线大学城南[地铁站]', '13538445129', 0, b'0', b'0', '2022-03-11 18:36:22', '2023-02-18 21:20:29', b'0');
INSERT INTO `o_order` VALUES (20, 1, 'oUfzP5XvqEfw60TaNMR40gN8LWhA', '别上班了吧', '广东省广州市番禺区广东药科大学11栋311', '13538445129', 1, b'0', b'0', '2022-03-12 15:13:23', '2023-02-18 21:20:29', b'0');
INSERT INTO `o_order` VALUES (21, 1, 'oUfzP5XvqEfw60TaNMR40gN8LWhA', '别上班了吧', '广东省广州市番禺区广东药科大学11栋311', '13538445129', 2, b'0', b'0', '2022-03-12 15:14:11', '2023-02-18 21:20:29', b'1');
INSERT INTO `o_order` VALUES (22, 1, 'oUfzP5XvqEfw60TaNMR40gN8LWhA', '别上班了吧', '广东省广州市番禺区广东药科大学11栋311', '13538445129', 0, b'0', b'0', '2022-03-12 15:14:33', '2023-02-18 21:20:29', b'0');
INSERT INTO `o_order` VALUES (23, 2, 'oUfzP5XvqEfw60TaNMR40gN8LWhA', '别上班了吧', '广东省广州市番禺区广东药科大学11栋311', '13538445129', 2, b'0', b'0', '2022-03-12 17:29:37', '2023-02-18 21:20:29', b'1');
INSERT INTO `o_order` VALUES (24, 1, 'oUfzP5SbK9dz-gdOpGMe08tsP1ks', '程同学', '广东省广州市番禺区东环街道地铁4号线,地铁7号线大学城南[地铁站]', '13538445129', 0, b'0', b'0', '2022-03-13 16:26:55', '2023-02-18 21:20:29', b'0');
INSERT INTO `o_order` VALUES (25, 1, 'oUfzP5XvqEfw60TaNMR40gN8LWhA', '张三', '广东省广州市海珠区新港中路397号', '020-81167888', 0, b'0', b'0', '2022-03-14 19:36:23', NULL, b'0');
INSERT INTO `o_order` VALUES (26, 2, 'oUfzP5XvqEfw60TaNMR40gN8LWhA', '张三', '广东省广州市海珠区新港中路397号', '020-81167888', 0, b'0', b'0', '2022-03-14 19:36:23', NULL, b'0');
INSERT INTO `o_order` VALUES (27, 3, 'oUfzP5SbK9dz-gdOpGMe08tsP1ks', '程同学', '广东省广州市番禺区东环街道地铁4号线,地铁7号线大学城南[地铁站]', '13538445129', 2, b'0', b'0', '2022-05-06 22:40:32', '2023-02-18 21:20:29', b'1');
INSERT INTO `o_order` VALUES (28, 3, 'oUfzP5XvqEfw60TaNMR40gN8LWhA', 'cjp', '广东省广州市番禺区大学城', '13538445990', 2, b'0', b'0', '2022-05-07 15:27:00', '2022-05-07 15:57:25', b'1');
INSERT INTO `o_order` VALUES (29, 1, 'oUfzP5XvqEfw60TaNMR40gN8LWhA', '别上班了吧', '广东省广州市番禺区广东药科大学11栋311', '13538445129', 2, b'0', b'0', '2022-05-07 15:57:06', '2023-02-18 21:20:29', b'1');
INSERT INTO `o_order` VALUES (30, 2, 'oUfzP5XvqEfw60TaNMR40gN8LWhA', '别上班了吧', '广东省东莞市常平镇花和小城叠翠苑B座3A', '13538445129', 0, b'0', b'0', '2022-05-07 16:11:42', '2023-02-18 21:20:29', b'0');
INSERT INTO `o_order` VALUES (31, 2, 'oUfzP5XvqEfw60TaNMR40gN8LWhA', 'cjp', '广东省广州市番禺区大学城', '13538445990', 0, b'0', b'0', '2022-05-07 16:14:34', NULL, b'0');
INSERT INTO `o_order` VALUES (32, 2, 'oUfzP5XvqEfw60TaNMR40gN8LWhA', '别上班了吧', '广东省广州市番禺区广东药科大学11栋311', '13538445129', 0, b'0', b'0', '2022-05-07 16:20:43', '2023-02-18 21:20:29', b'0');
INSERT INTO `o_order` VALUES (33, 3, 'oUfzP5SbK9dz-gdOpGMe08tsP1ks', '程同学', '广东省广州市番禺区东环街道地铁4号线,地铁7号线大学城南[地铁站]', '13538445129', 2, b'0', b'0', '2022-05-07 16:22:20', '2023-02-18 21:20:29', b'1');
INSERT INTO `o_order` VALUES (34, 2, 'oUfzP5XvqEfw60TaNMR40gN8LWhA', '别上班了吧', '广东省广州市番禺区广东药科大学11栋311', '13538445129', 2, b'0', b'0', '2022-05-07 16:26:15', '2023-02-18 21:20:29', b'0');
COMMIT;

-- ----------------------------
-- Table structure for o_order_food
-- ----------------------------
DROP TABLE IF EXISTS `o_order_food`;
CREATE TABLE `o_order_food` (
  `id` int NOT NULL AUTO_INCREMENT,
  `order_id` int DEFAULT NULL,
  `food_id` int DEFAULT NULL,
  `count` int DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=49 DEFAULT CHARSET=utf8mb3;

-- ----------------------------
-- Records of o_order_food
-- ----------------------------
BEGIN;
INSERT INTO `o_order_food` VALUES (1, 1, 1, 2);
INSERT INTO `o_order_food` VALUES (2, 1, 9, 1);
INSERT INTO `o_order_food` VALUES (3, 1, 17, 2);
INSERT INTO `o_order_food` VALUES (4, 2, 5, 1);
INSERT INTO `o_order_food` VALUES (5, 2, 6, 1);
INSERT INTO `o_order_food` VALUES (6, 3, 18, 1);
INSERT INTO `o_order_food` VALUES (7, 4, 12, 1);
INSERT INTO `o_order_food` VALUES (8, 9, 3, 1);
INSERT INTO `o_order_food` VALUES (9, 9, 5, 1);
INSERT INTO `o_order_food` VALUES (10, 10, 24, 1);
INSERT INTO `o_order_food` VALUES (11, 10, 31, 1);
INSERT INTO `o_order_food` VALUES (12, 11, 47, 1);
INSERT INTO `o_order_food` VALUES (13, 12, 50, 1);
INSERT INTO `o_order_food` VALUES (14, 13, 50, 1);
INSERT INTO `o_order_food` VALUES (15, 14, 29, 1);
INSERT INTO `o_order_food` VALUES (16, 15, 50, 1);
INSERT INTO `o_order_food` VALUES (17, 16, 29, 1);
INSERT INTO `o_order_food` VALUES (18, 17, 3, 1);
INSERT INTO `o_order_food` VALUES (19, 18, 33, 1);
INSERT INTO `o_order_food` VALUES (20, 19, 41, 1);
INSERT INTO `o_order_food` VALUES (21, 19, 39, 1);
INSERT INTO `o_order_food` VALUES (22, 19, 26, 1);
INSERT INTO `o_order_food` VALUES (23, 20, 8, 1);
INSERT INTO `o_order_food` VALUES (24, 21, 3, 1);
INSERT INTO `o_order_food` VALUES (25, 22, 15, 1);
INSERT INTO `o_order_food` VALUES (26, 23, 40, 2);
INSERT INTO `o_order_food` VALUES (27, 23, 41, 1);
INSERT INTO `o_order_food` VALUES (28, 23, 42, 1);
INSERT INTO `o_order_food` VALUES (29, 24, 47, 1);
INSERT INTO `o_order_food` VALUES (30, 24, 8, 1);
INSERT INTO `o_order_food` VALUES (31, 24, 11, 1);
INSERT INTO `o_order_food` VALUES (32, 24, 20, 1);
INSERT INTO `o_order_food` VALUES (33, 25, 1, 1);
INSERT INTO `o_order_food` VALUES (34, 25, 3, 1);
INSERT INTO `o_order_food` VALUES (35, 26, 25, 1);
INSERT INTO `o_order_food` VALUES (36, 27, 51, 1);
INSERT INTO `o_order_food` VALUES (37, 28, 51, 1);
INSERT INTO `o_order_food` VALUES (38, 29, 8, 1);
INSERT INTO `o_order_food` VALUES (39, 30, 21, 2);
INSERT INTO `o_order_food` VALUES (40, 30, 23, 1);
INSERT INTO `o_order_food` VALUES (41, 31, 21, 1);
INSERT INTO `o_order_food` VALUES (42, 31, 22, 1);
INSERT INTO `o_order_food` VALUES (43, 31, 23, 1);
INSERT INTO `o_order_food` VALUES (44, 31, 24, 1);
INSERT INTO `o_order_food` VALUES (45, 32, 22, 1);
INSERT INTO `o_order_food` VALUES (46, 32, 24, 1);
INSERT INTO `o_order_food` VALUES (47, 33, 52, 1);
INSERT INTO `o_order_food` VALUES (48, 34, 21, 1);
COMMIT;

-- ----------------------------
-- Table structure for o_shop
-- ----------------------------
DROP TABLE IF EXISTS `o_shop`;
CREATE TABLE `o_shop` (
  `id` int NOT NULL AUTO_INCREMENT COMMENT '店铺id',
  `user_id` int NOT NULL COMMENT '店主的id，店铺属于店主',
  `owner_name` varchar(20) DEFAULT NULL COMMENT '店主名字',
  `shop_name` varchar(20) DEFAULT NULL COMMENT '店铺名字',
  `shop_src` varchar(255) DEFAULT NULL COMMENT '店铺照片地址',
  `phone` varchar(20) DEFAULT NULL COMMENT '店铺电话，就是店主电话',
  `summary` varchar(255) DEFAULT '该店铺暂无简介～' COMMENT '店铺简介',
  `stars` int NOT NULL DEFAULT '5' COMMENT '店铺评分，1-5分整数',
  `weight` int NOT NULL DEFAULT '1' COMMENT '店铺权重，1-10分整数',
  `closed` bit(1) NOT NULL DEFAULT b'0' COMMENT '店铺是否营业，店主修改，默认0',
  `is_shut_down` bit(1) NOT NULL DEFAULT b'0' COMMENT '店铺是否上架，管理员修改，默认0',
  PRIMARY KEY (`id`),
  KEY `user_id` (`user_id`),
  CONSTRAINT `user_id` FOREIGN KEY (`user_id`) REFERENCES `o_user` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=utf8mb3;

-- ----------------------------
-- Records of o_shop
-- ----------------------------
BEGIN;
INSERT INTO `o_shop` VALUES (1, 2, '张大妈', '张大妈早餐店', 'http://food-1309527051.cos.ap-guangzhou.myqcloud.com/截屏2022-02-24 下午6.10.45.png', '19857560888', '平价早餐，真的很便宜，全部新鲜出炉，欢迎下单，如有问题请联系电话', 2, 9, b'0', b'0');
INSERT INTO `o_shop` VALUES (2, 3, '李大爷', '小众小炒', 'http://food-1309527051.cos.ap-guangzhou.myqcloud.com/截屏2022-02-24 下午6.13.49.png', '13538445567', '总有一款小炒适合你～', 2, 9, b'0', b'0');
INSERT INTO `o_shop` VALUES (3, 4, '李奶茶', '李胖猪奶茶哈哈哈哈哈', 'http://food-1309527051.cos.ap-guangzhou.myqcloud.com/截屏2022-02-26 下午6.23.57.png', '19124338888', '美味奶茶，一杯肥一斤', 2, 2, b'0', b'0');
INSERT INTO `o_shop` VALUES (4, 6, '王炸鸡', '纯手工炸鸡(大学城店)', 'http://food-1309527051.cos.ap-guangzhou.myqcloud.com/截屏2022-02-26 下午6.31.36.png', '19859509534', '纯手工炸鸡，香气扑鼻的新鲜地沟油', 2, 7, b'0', b'0');
INSERT INTO `o_shop` VALUES (5, 7, '程烧烤', '坏兄弟烧烤', 'http://food-1309527051.cos.ap-guangzhou.myqcloud.com/截屏2022-02-26 下午6.36.51.png', '17738445990', '暖心烧烤，现点现烤，不拉肚子不赔钱', 2, 8, b'0', b'0');
INSERT INTO `o_shop` VALUES (6, 8, 'cup', 'cup', 'http://food-1309527051.cos.ap-guangzhou.myqcloud.com/白粥.png', '13834556880', '该店铺暂无简介～', 5, 6, b'0', b'0');
COMMIT;

-- ----------------------------
-- Table structure for o_swiper
-- ----------------------------
DROP TABLE IF EXISTS `o_swiper`;
CREATE TABLE `o_swiper` (
  `id` int NOT NULL AUTO_INCREMENT,
  `src` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8mb3;

-- ----------------------------
-- Records of o_swiper
-- ----------------------------
BEGIN;
INSERT INTO `o_swiper` VALUES (1, 'https://food-1309527051.cos.ap-guangzhou.myqcloud.com/todaymiaosha.png');
INSERT INTO `o_swiper` VALUES (2, 'https://food-1309527051.cos.ap-guangzhou.myqcloud.com/bg1.png');
INSERT INTO `o_swiper` VALUES (3, 'https://food-1309527051.cos.ap-guangzhou.myqcloud.com/bg2.png');
INSERT INTO `o_swiper` VALUES (4, 'https://food-1309527051.cos.ap-guangzhou.myqcloud.com/bg3.png');
INSERT INTO `o_swiper` VALUES (5, 'https://food-1309527051.cos.ap-guangzhou.myqcloud.com/bg4.png');
INSERT INTO `o_swiper` VALUES (6, 'https://food-1309527051.cos.ap-guangzhou.myqcloud.com/bg5.png');
COMMIT;

-- ----------------------------
-- Table structure for o_time_test
-- ----------------------------
DROP TABLE IF EXISTS `o_time_test`;
CREATE TABLE `o_time_test` (
  `id` int NOT NULL AUTO_INCREMENT,
  `uid` int NOT NULL,
  `created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb3;

-- ----------------------------
-- Records of o_time_test
-- ----------------------------
BEGIN;
INSERT INTO `o_time_test` VALUES (1, 111, '2022-02-09 13:28:49', '2022-02-09 13:53:59');
INSERT INTO `o_time_test` VALUES (2, 888, '2022-02-09 13:51:32', '2022-02-09 13:51:32');
COMMIT;

-- ----------------------------
-- Table structure for o_user
-- ----------------------------
DROP TABLE IF EXISTS `o_user`;
CREATE TABLE `o_user` (
  `id` int NOT NULL AUTO_INCREMENT COMMENT '店主owner的id',
  `username` varchar(255) NOT NULL COMMENT '店主登录账号',
  `password` varchar(255) NOT NULL COMMENT '店主登录密码',
  `is_admin` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否为管理员，0为店主',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=10 DEFAULT CHARSET=utf8mb3;

-- ----------------------------
-- Records of o_user
-- ----------------------------
BEGIN;
INSERT INTO `o_user` VALUES (1, 'admin', 'admin', b'1');
INSERT INTO `o_user` VALUES (2, 'zaocan', 'zaocan', b'0');
INSERT INTO `o_user` VALUES (3, 'wucan', 'wucan', b'0');
INSERT INTO `o_user` VALUES (4, 'naicha', 'naicha', b'0');
INSERT INTO `o_user` VALUES (5, 'drinkt', 'drinkt', b'0');
INSERT INTO `o_user` VALUES (6, 'zhaji', 'zhaji', b'0');
INSERT INTO `o_user` VALUES (7, 'shaokao', 'shaokao', b'0');
INSERT INTO `o_user` VALUES (8, 'lala', 'lala', b'0');
INSERT INTO `o_user` VALUES (9, '123', '123', b'0');
COMMIT;

SET FOREIGN_KEY_CHECKS = 1;
